/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-05-06     liuchao       the first version
 */
#define LOG_TAG "init"
#include <ulog.h>
#include <rtthread.h>
#include "drv_relay.h"
#include "drv_panel.h"

static int init_ec()
{
    relay_init(RELAY_PERIPH_PWR);
    return RT_EOK;
}
INIT_ENV_EXPORT(init_ec);

static int init_panels()
{
    for (int panel = PANEL_RED; panel <= PANEL_YELLOW; panel++)
    {
        panel_on(panel);
        rt_thread_mdelay(500);
    }
    for (int panel = PANEL_RED; panel <= PANEL_YELLOW; panel++)
    {
        panel_off(panel);
    }

    return RT_EOK;
}
INIT_COMPONENT_EXPORT(init_panels);

